﻿@model PagedList<Common.Background.WebManageUsers>
@helper DisplayFormat(string info)
{
    if (string.IsNullOrWhiteSpace(info))
    {
    <span>No Info</span> 
    }
    else
    {
    <span>@info</span>
    }
}
<table>
    <tr>
        <th></th>
        <th>编号
        </th>
        <th>用户名称
        </th>
        <th>真实姓名
        </th>
        <th>Email
        </th>
        <th>所属部门
        </th>
        <th>更新日期
        </th>
        <th>状态
        </th>
        <th>所在系统
        </th>
    </tr>
    <tbody>
        @if (Model != null && Model.Count() > 0)
        {
            foreach (var item in Model)
            {
            <tr>
                <td>
                    @Html.Partial("_ButtonPanelPartial", item.ManageUserID)
                </td>
                <td>
                    @item.ManageUserID
                </td>
                <td>
                    @item.LoginName
                </td>
                <td>
                    @DisplayFormat(item.RealName)
                </td>
                <td>
                    @DisplayFormat(item.Email)
                </td>
                <td>
                    @item.WebDepartments.DepartmentName
                </td>
                <td>
                    @String.Format("{0:g}", item.UpdateDate)
                </td>
                <td>
                    @(((EntityFrameworks.Entity.Core.CommonEnums.Status)item.Status).GetDescription())
                </td>
                <td>
                    @item.WebSystemID
                </td>
            </tr>
            }
        }
        else
        {
            <tr>
                <td colspan="9">没有相关信息
                </td>
            </tr>  
        }
    </tbody>
    <tfoot>
        <tr>
            <td colspan="9">@EntityFrameworks.Web.Core.Helper.PagerHelper.Pager(Html, Model)
            </td>
        </tr>
    </tfoot>
</table>
